package ltd.hxya.novel.admin.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import ltd.hxya.novel.admin.entity.Operation;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author hty
 * @since 2022-10-04
 */
@Mapper
public interface OperationMapper extends BaseMapper<Operation> {

    List<Operation> operationsByUserId(Integer userId);

    List<Operation> operationsByRoleId(Integer roleId);

    Page<Operation> noHasPermission(Page<Operation> page,@Param("userId") Integer userId);
}
